from pydantic import BaseModel, Field
from typing import Optional

class WorkBenchProcessStepBase(BaseModel):
    stepName: str = Field(..., description="工序步骤名称")
    actualTime: Optional[float] = Field(None, description="实际耗时")

class WorkBenchProcessStepCreate(WorkBenchProcessStepBase):
    stepId: str = Field(..., description="工序步骤ID")

class WorkBenchProcessStepUpdate(BaseModel):
    stepName: Optional[str] = None
    actualTime: Optional[float] = None

class WorkBenchProcessStepDetail(WorkBenchProcessStepBase):
    stepId: str
    createdBy: Optional[str] = Field(None, description="创建人(后端自动生成)")
    createdAt: Optional[str] = Field(None, description="创建时间(后端自动生成)")
    updatedBy: Optional[str] = Field(None, description="更新人(后端自动生成)")
    updatedAt: Optional[str] = Field(None, description="更新时间(后端自动生成)") 